<template>
  <div id="" class="paT55">
    <OLMap @ready="ready" module="mesher" :isTools="true" :isMapCut="true" :isCoord="true" :isRuler="true"></OLMap>
  </div>
</template>

<script>

import OLMap from '../../../components/OLMap'
import Graticule from 'ol/layer/Graticule'
import Stroke from 'ol/style/Stroke'

export default {
  name: 'MesherMap',
  components: {OLMap},
  data: function () {
    return {
    }
  },
  // dom加载后调用
  mounted () {
  },
  created () {
  },
  methods: {
    // 注入map对象
    ready (obj) {
      const mapObj = obj

      let graticule = new Graticule({
        // the style to use for the lines, optional.
        strokeStyle: new Stroke({
          color: 'rgba(255,120,0,0.9)',
          width: 2,
          lineDash: [0.5, 4]
        }),
        showLabels: true,
        wrapX: false
      })

      mapObj.addLayer(graticule)
    }
  }

}
</script>

<style scoped>
</style>
